<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
	<title><{config_item('website_title')}></title>
	<meta content="<{config_item('website_keywords')}>" name="Keywords">
	<meta content="<{config_item('website_desc')}>" name="description"/>
	<link rel="stylesheet" type="text/css" href="/views/web/skin/css/style.css" />
	<script type="text/javascript" src="/public/js/jquery.js"></script>
	<script type="text/javascript" src="/public/js/validform.js"></script>
	<script type="text/javascript" src="/public/js/layer/layer.js"></script>
	<script type="text/javascript" src="/public/js/artTemplate.js"></script>
</head>
<body>
	<div class="wrap">
		<{include file="web/header.html"}>
		 <!-- 内容 -->
		 <div class="wrapbox">
		 	<div class="scrapnav">
				您的当前位置：<a href="<{site_url("/<{get_segment(1)}>/welcome")}>">首页</a>><a href="<{site_url("/<{get_segment(1)}>/member")}>">我的账户</a>
		 	</div>
			 <form class="form form-horizontal" name="add" id="add" method="post" action="<{site_url("/<{get_segment(1)}>/member/balance/online_recharge_save")}>">
		 	<div class="yuwrap" style="min-height:500px;">
		 		<div class="yubox" style="padding:0 20px;">
		 			<div class="publictitle" >
			 			余额充值
			 		</div>
	 				<div class="loginboxleft_box clear" style="width:400px;">
	 					<div class="yuleft" >
	 						充值金额：
	 					</div>
	 					<div class="loginright">
							<input type="text" class="inputText" name="amount" datatype="price" nullmsg="请输入充值金额" errormsg="金额格式错误">
	 					</div>
	 				</div>
		 		</div>
		 		
 				<div class="paystylewrap">
 					<div class="paystylebox">
 						请选择支付方式
 					</div>
					<div class="paystyleitem" id="payment_list">
						<!--支付方式start-->
						<script type='text/html' id='payment_list_Template'>
							{{each result as payment_list i}}
							<div class="paystylelist clear">
								<label for="radio{{payment_list.id}}">
									<div class="radiobox">
										<input {{if i==0}}checked{{/if}} type="radio" value="{{payment_list.id}}" name="payment_id" class="inputradio" id="radio{{payment_list.id}}"/>
										<span></span>
									</div>
									<div class="paystyleimg">
										<img src="{{payment_list.logo}}">
									</div>
								</label>
							</div>
							{{/each}}
						</script>
 					</div>

 				</div>
 				<input type="submit" class="yubtn" value="确认充值">
		 	</div>
			 </form>
		 </div>
		<{include file="web/footer.html"}>
	</div>
	<script>
		//验证表单
		$(function(){
			$.Tipmsg.r=null;
			$("#add").Validform({
				tiptype:function(msg){
					layer.msg(msg);
				},
				tipSweep:true,
				ajaxPost:false,
				callback:function(data){
				}
			});
		})

		$(function(){
			//支付方式展示start
			$.ajax({
				type:"POST",
				url: '/api/payment/online_recharge_list',
				data: '',
				dataType:"json",
				success: function(data){
					if (data.status=='y') {
						var html = template('payment_list_Template',data);
						$('#payment_list').html(html);
					}
				}
			});
			//支付方式展示end
		})
	</script>
</body>
</html>